#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
//using namespace std;

template <class T>
void swap(T& a, T& b)
{
	T tmp = a;
	a = b;
	b = tmp;
}

int main()
{
	int a = 10;
	int b = 11;
	std::cout << a << "   " << b;
	swap<int>(a, b);
	std::cout << std::endl;
	std::cout << a << "   " << b;
	std::cout << std::endl;
	std::vector<int> v{ 1,3,4 };
	std::cout << v[0] << std::endl;
	v.insert(v.begin() + 1, 2);
	for (auto e : v)
	{
		std::cout << e << "		" ;
	}
	std::cout << std::endl;
	v.erase(v.end() - 1);
	for (auto e : v)
	{
		std::cout << e << "		";
	}

	std::cout << std::endl;
	std::vector<int> v1{ 1,3,4 };
	std::vector<int>::iterator it = v1.begin() + 1;
	it = v1.insert(it, 2);
	while (it != v1.end())
	{
		std::cout << *it << "	";
		++it;
	}


	return 0;
}